const mongoose = require('mongoose')

const Schema = mongoose.Schema

const todoSchema = new Schema({
  email: {
    type: String
  },
  todos: {
    type: Array,
    default: ([])
  },
  cTime: {
    type: Date,
    default: Date.now
  },
  endTime: {
    type: Date,
    default: Date.now
  }
})
module.exports = mongoose.model('Todo', todoSchema)